package com.lb.design.pattern.factorypattern;

import com.lb.design.pattern.factorypattern.factory.HumanFactory;
import com.lb.design.pattern.factorypattern.pojo.Human;
import com.lb.design.pattern.factorypattern.pojo.impl.WhitePerson;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: liubin
 * Date: 2017-12-29
 * Time: 下午 5:21
 */
public class Test {

    public static void main(String[] args) {

        Human whiteHuman = HumanFactory.createHuman(WhitePerson.class);
        whiteHuman.cry();
        whiteHuman.eat();
        whiteHuman.laugh();

        whiteHuman = HumanFactory.createHuman();
        whiteHuman.cry();
        whiteHuman.eat();
        whiteHuman.laugh();

    }

}
